

package com.scs.application.modules.upms.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.model.TreeEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 行政区划实体对象
*/
@TableName("area")
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
@Accessors(chain = true)
public class Area extends TreeEntity  implements Serializable {

    /** 区域名称 */
    @NotBlank(message="区域名称不能为空")
    @Length(min=1, max=100, message="区域名称长度必须介于 1 和 100 之间")
    private String name;

    /**
     * 父级品类名称
     */
    @TableField(exist = false)
    private String parentName;



}
